package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.CurrencyRecordMapper;
import com.education.wisdom.pojo.CurrencyRecord;
import com.education.wisdom.service.ICurrencyRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 支付记录 服务层实现
 * 
 * @author ruoyi
 * @date 2018-11-20
 */
@Service
public class CurrencyRecordServiceImpl implements ICurrencyRecordService
{
	@Autowired
	private CurrencyRecordMapper currencyRecordMapper;

	/**
     * 查询支付记录信息
     * 
     * @param id 支付记录ID
     * @return 支付记录信息
     */
    @Override
	public CurrencyRecord selectCurrencyRecordById(Integer id)
	{
	    return currencyRecordMapper.selectCurrencyRecordById(id);
	}

	@Override
	public CurrencyRecord selectCurrencyRecordByPara(Map<String, Object> map) {
		return currencyRecordMapper.selectCurrencyRecordByPara(map);
	}

	/**
	 * 查询支付记录列表
	 *
	 * @param currencyRecord 支付记录信息
	 * @return 支付记录集合
	 */
	@Override
	public List<CurrencyRecord> selectCurrencyRecordListOther(CurrencyRecord currencyRecord) {
		return currencyRecordMapper.selectCurrencyRecordListOther(currencyRecord);
	}

	/**
	 * 查询支付记录列表
	 *
	 * @param currencyRecord 支付记录信息
	 * @return 支付记录集合
	 */
	@Override
	public List<CurrencyRecord> selectCurrencyRecordListOtherTwo(CurrencyRecord currencyRecord) {
		return currencyRecordMapper.selectCurrencyRecordListOtherTwo(currencyRecord);
	}

	/**
     * 查询支付记录列表
     * 
     * @param currencyRecord 支付记录信息
     * @return 支付记录集合
     */
	@Override
	public List<CurrencyRecord> selectCurrencyRecordList(CurrencyRecord currencyRecord)
	{
	    return currencyRecordMapper.selectCurrencyRecordList(currencyRecord);
	}

    /**
     * 新增支付记录
     * 
     * @param currencyRecord 支付记录信息
     * @return 结果
     */
	@Override
	public int insertCurrencyRecord(CurrencyRecord currencyRecord)
	{
	    return currencyRecordMapper.insertCurrencyRecord(currencyRecord);
	}
	
	/**
     * 修改支付记录
     * 
     * @param currencyRecord 支付记录信息
     * @return 结果
     */
	@Override
	public int updateCurrencyRecord(CurrencyRecord currencyRecord)
	{
	    return currencyRecordMapper.updateCurrencyRecord(currencyRecord);
	}

	/**
     * 删除支付记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteCurrencyRecordByIds(String ids)
	{
		return currencyRecordMapper.deleteCurrencyRecordByIds(Convert.toStrArray(ids));
	}

	@Override
	public int deleteCurrencyRecordById(Integer id) {
		return currencyRecordMapper.deleteCurrencyRecordById(id);
	}

	@Override
	public BigDecimal incomeCurrencyRecord(Map<String, Object> map) {
		return currencyRecordMapper.incomeCurrencyRecord(map);
	}

	@Override
	public BigDecimal expenditureCurrencyRecord(Map<String, Object> map) {
		return currencyRecordMapper.expenditureCurrencyRecord(map);
	}

	@Override
	public CurrencyRecord selectByCurrencyId(String trade_no) {
		return currencyRecordMapper.selectByCurrencyId(trade_no);
	}

}
